<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<TITLE>
NaturalRanking (Commons Math 3.2 API)
</TITLE>


<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../../stylesheet.css" TITLE="Style">

<SCRIPT type="text/javascript">
function windowTitle()
{
    if (location.href.indexOf('is-external=true') == -1) {
        parent.document.title="NaturalRanking (Commons Math 3.2 API)";
    }
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>

</HEAD>

<BODY BGCOLOR="white" onload="windowTitle();">
<HR>


<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/NaturalRanking.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../../../org/apache/commons/math3/stat/ranking/NaNStrategy.html" title="enum in org.apache.commons.math3.stat.ranking"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../../../org/apache/commons/math3/stat/ranking/RankingAlgorithm.html" title="interface in org.apache.commons.math3.stat.ranking"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../../../index.html?org/apache/commons/math3/stat/ranking/NaturalRanking.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="NaturalRanking.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->

<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
org.apache.commons.math3.stat.ranking</FONT>
<BR>
Class NaturalRanking</H2>
<PRE>
<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A>
  <IMG SRC="../../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.commons.math3.stat.ranking.NaturalRanking</B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../../../../org/apache/commons/math3/stat/ranking/RankingAlgorithm.html" title="interface in org.apache.commons.math3.stat.ranking">RankingAlgorithm</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>public class <B>NaturalRanking</B><DT>extends <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A><DT>implements <A HREF="../../../../../../org/apache/commons/math3/stat/ranking/RankingAlgorithm.html" title="interface in org.apache.commons.math3.stat.ranking">RankingAlgorithm</A></DL>
</PRE>

<P>
<p> Ranking based on the natural ordering on doubles.</p>
 <p>NaNs are treated according to the configured <A HREF="../../../../../../org/apache/commons/math3/stat/ranking/NaNStrategy.html" title="enum in org.apache.commons.math3.stat.ranking"><CODE>NaNStrategy</CODE></A> and ties
 are handled using the selected <A HREF="../../../../../../org/apache/commons/math3/stat/ranking/TiesStrategy.html" title="enum in org.apache.commons.math3.stat.ranking"><CODE>TiesStrategy</CODE></A>.
 Configuration settings are supplied in optional constructor arguments.
 Defaults are <A HREF="../../../../../../org/apache/commons/math3/stat/ranking/NaNStrategy.html#FAILED"><CODE>NaNStrategy.FAILED</CODE></A> and <A HREF="../../../../../../org/apache/commons/math3/stat/ranking/TiesStrategy.html#AVERAGE"><CODE>TiesStrategy.AVERAGE</CODE></A>,
 respectively. When using <A HREF="../../../../../../org/apache/commons/math3/stat/ranking/TiesStrategy.html#RANDOM"><CODE>TiesStrategy.RANDOM</CODE></A>, a
 <A HREF="../../../../../../org/apache/commons/math3/random/RandomGenerator.html" title="interface in org.apache.commons.math3.random"><CODE>RandomGenerator</CODE></A> may be supplied as a constructor argument.</p>
 <p>Examples:
 <table border="1" cellpadding="3">
 <tr><th colspan="3">
 Input data: (20, 17, 30, 42.3, 17, 50, Double.NaN, Double.NEGATIVE_INFINITY, 17)
 </th></tr>
 <tr><th>NaNStrategy</th><th>TiesStrategy</th>
 <th><code>rank(data)</code></th>
 <tr>
 <td>default (NaNs maximal)</td>
 <td>default (ties averaged)</td>
 <td>(5, 3, 6, 7, 3, 8, 9, 1, 3)</td></tr>
 <tr>
 <td>default (NaNs maximal)</td>
 <td>MINIMUM</td>
 <td>(5, 2, 6, 7, 2, 8, 9, 1, 2)</td></tr>
 <tr>
 <td>MINIMAL</td>
 <td>default (ties averaged)</td>
 <td>(6, 4, 7, 8, 4, 9, 1.5, 1.5, 4)</td></tr>
 <tr>
 <td>REMOVED</td>
 <td>SEQUENTIAL</td>
 <td>(5, 2, 6, 7, 3, 8, 1, 4)</td></tr>
 <tr>
 <td>MINIMAL</td>
 <td>MAXIMUM</td>
 <td>(6, 5, 7, 8, 5, 9, 2, 2, 5)</td></tr></table></p>
<P>

<P>
<DL>
<DT><B>Since:</B></DT>
  <DD>2.0</DD>
<DT><B>Version:</B></DT>
  <DD>$Id: NaturalRanking.java 1454897 2013-03-10 19:02:54Z luc $</DD>
</DL>
<HR>

<P>
<!-- =========== FIELD SUMMARY =========== -->

<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Field Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="../../../../../../org/apache/commons/math3/stat/ranking/NaNStrategy.html" title="enum in org.apache.commons.math3.stat.ranking">NaNStrategy</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/commons/math3/stat/ranking/NaturalRanking.html#DEFAULT_NAN_STRATEGY">DEFAULT_NAN_STRATEGY</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;default NaN strategy</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="../../../../../../org/apache/commons/math3/stat/ranking/TiesStrategy.html" title="enum in org.apache.commons.math3.stat.ranking">TiesStrategy</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/commons/math3/stat/ranking/NaturalRanking.html#DEFAULT_TIES_STRATEGY">DEFAULT_TIES_STRATEGY</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;default ties strategy</TD>
</TR>
</TABLE>
&nbsp;
<!-- ======== CONSTRUCTOR SUMMARY ======== -->

<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../../org/apache/commons/math3/stat/ranking/NaturalRanking.html#NaturalRanking()">NaturalRanking</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a NaturalRanking with default strategies for handling ties and NaNs.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../../org/apache/commons/math3/stat/ranking/NaturalRanking.html#NaturalRanking(org.apache.commons.math3.stat.ranking.NaNStrategy)">NaturalRanking</A></B>(<A HREF="../../../../../../org/apache/commons/math3/stat/ranking/NaNStrategy.html" title="enum in org.apache.commons.math3.stat.ranking">NaNStrategy</A>&nbsp;nanStrategy)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a NaturalRanking with the given NaNStrategy.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../../org/apache/commons/math3/stat/ranking/NaturalRanking.html#NaturalRanking(org.apache.commons.math3.stat.ranking.NaNStrategy, org.apache.commons.math3.random.RandomGenerator)">NaturalRanking</A></B>(<A HREF="../../../../../../org/apache/commons/math3/stat/ranking/NaNStrategy.html" title="enum in org.apache.commons.math3.stat.ranking">NaNStrategy</A>&nbsp;nanStrategy,
               <A HREF="../../../../../../org/apache/commons/math3/random/RandomGenerator.html" title="interface in org.apache.commons.math3.random">RandomGenerator</A>&nbsp;randomGenerator)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a NaturalRanking with the given NaNStrategy, TiesStrategy.RANDOM
 and the given source of random data.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../../org/apache/commons/math3/stat/ranking/NaturalRanking.html#NaturalRanking(org.apache.commons.math3.stat.ranking.NaNStrategy, org.apache.commons.math3.stat.ranking.TiesStrategy)">NaturalRanking</A></B>(<A HREF="../../../../../../org/apache/commons/math3/stat/ranking/NaNStrategy.html" title="enum in org.apache.commons.math3.stat.ranking">NaNStrategy</A>&nbsp;nanStrategy,
               <A HREF="../../../../../../org/apache/commons/math3/stat/ranking/TiesStrategy.html" title="enum in org.apache.commons.math3.stat.ranking">TiesStrategy</A>&nbsp;tiesStrategy)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a NaturalRanking with the given NaNStrategy and TiesStrategy.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../../org/apache/commons/math3/stat/ranking/NaturalRanking.html#NaturalRanking(org.apache.commons.math3.random.RandomGenerator)">NaturalRanking</A></B>(<A HREF="../../../../../../org/apache/commons/math3/random/RandomGenerator.html" title="interface in org.apache.commons.math3.random">RandomGenerator</A>&nbsp;randomGenerator)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a NaturalRanking with TiesStrategy.RANDOM and the given
 RandomGenerator as the source of random data.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../../org/apache/commons/math3/stat/ranking/NaturalRanking.html#NaturalRanking(org.apache.commons.math3.stat.ranking.TiesStrategy)">NaturalRanking</A></B>(<A HREF="../../../../../../org/apache/commons/math3/stat/ranking/TiesStrategy.html" title="enum in org.apache.commons.math3.stat.ranking">TiesStrategy</A>&nbsp;tiesStrategy)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a NaturalRanking with the given TiesStrategy.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->

<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../../org/apache/commons/math3/stat/ranking/NaNStrategy.html" title="enum in org.apache.commons.math3.stat.ranking">NaNStrategy</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/commons/math3/stat/ranking/NaturalRanking.html#getNanStrategy()">getNanStrategy</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the NaNStrategy</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../../org/apache/commons/math3/stat/ranking/TiesStrategy.html" title="enum in org.apache.commons.math3.stat.ranking">TiesStrategy</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/commons/math3/stat/ranking/NaturalRanking.html#getTiesStrategy()">getTiesStrategy</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the TiesStrategy</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;double[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/commons/math3/stat/ranking/NaturalRanking.html#rank(double[])">rank</A></B>(double[]&nbsp;data)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Rank <code>data</code> using the natural ordering on Doubles, with
 NaN values handled according to <code>nanStrategy</code> and ties
 resolved using <code>tiesStrategy.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ============ FIELD DETAIL =========== -->

<A NAME="field_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Field Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="DEFAULT_NAN_STRATEGY"><!-- --></A><H3>
DEFAULT_NAN_STRATEGY</H3>
<PRE>
public static final <A HREF="../../../../../../org/apache/commons/math3/stat/ranking/NaNStrategy.html" title="enum in org.apache.commons.math3.stat.ranking">NaNStrategy</A> <B>DEFAULT_NAN_STRATEGY</B></PRE>
<DL>
<DD>default NaN strategy
<P>
<DL>
</DL>
</DL>
<HR>

<A NAME="DEFAULT_TIES_STRATEGY"><!-- --></A><H3>
DEFAULT_TIES_STRATEGY</H3>
<PRE>
public static final <A HREF="../../../../../../org/apache/commons/math3/stat/ranking/TiesStrategy.html" title="enum in org.apache.commons.math3.stat.ranking">TiesStrategy</A> <B>DEFAULT_TIES_STRATEGY</B></PRE>
<DL>
<DD>default ties strategy
<P>
<DL>
</DL>
</DL>

<!-- ========= CONSTRUCTOR DETAIL ======== -->

<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="NaturalRanking()"><!-- --></A><H3>
NaturalRanking</H3>
<PRE>
public <B>NaturalRanking</B>()</PRE>
<DL>
<DD>Create a NaturalRanking with default strategies for handling ties and NaNs.
<P>
</DL>
<HR>

<A NAME="NaturalRanking(org.apache.commons.math3.stat.ranking.TiesStrategy)"><!-- --></A><H3>
NaturalRanking</H3>
<PRE>
public <B>NaturalRanking</B>(<A HREF="../../../../../../org/apache/commons/math3/stat/ranking/TiesStrategy.html" title="enum in org.apache.commons.math3.stat.ranking">TiesStrategy</A>&nbsp;tiesStrategy)</PRE>
<DL>
<DD>Create a NaturalRanking with the given TiesStrategy.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>tiesStrategy</CODE> - the TiesStrategy to use</DL>
</DL>
<HR>

<A NAME="NaturalRanking(org.apache.commons.math3.stat.ranking.NaNStrategy)"><!-- --></A><H3>
NaturalRanking</H3>
<PRE>
public <B>NaturalRanking</B>(<A HREF="../../../../../../org/apache/commons/math3/stat/ranking/NaNStrategy.html" title="enum in org.apache.commons.math3.stat.ranking">NaNStrategy</A>&nbsp;nanStrategy)</PRE>
<DL>
<DD>Create a NaturalRanking with the given NaNStrategy.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>nanStrategy</CODE> - the NaNStrategy to use</DL>
</DL>
<HR>

<A NAME="NaturalRanking(org.apache.commons.math3.stat.ranking.NaNStrategy, org.apache.commons.math3.stat.ranking.TiesStrategy)"><!-- --></A><H3>
NaturalRanking</H3>
<PRE>
public <B>NaturalRanking</B>(<A HREF="../../../../../../org/apache/commons/math3/stat/ranking/NaNStrategy.html" title="enum in org.apache.commons.math3.stat.ranking">NaNStrategy</A>&nbsp;nanStrategy,
                      <A HREF="../../../../../../org/apache/commons/math3/stat/ranking/TiesStrategy.html" title="enum in org.apache.commons.math3.stat.ranking">TiesStrategy</A>&nbsp;tiesStrategy)</PRE>
<DL>
<DD>Create a NaturalRanking with the given NaNStrategy and TiesStrategy.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>nanStrategy</CODE> - NaNStrategy to use<DD><CODE>tiesStrategy</CODE> - TiesStrategy to use</DL>
</DL>
<HR>

<A NAME="NaturalRanking(org.apache.commons.math3.random.RandomGenerator)"><!-- --></A><H3>
NaturalRanking</H3>
<PRE>
public <B>NaturalRanking</B>(<A HREF="../../../../../../org/apache/commons/math3/random/RandomGenerator.html" title="interface in org.apache.commons.math3.random">RandomGenerator</A>&nbsp;randomGenerator)</PRE>
<DL>
<DD>Create a NaturalRanking with TiesStrategy.RANDOM and the given
 RandomGenerator as the source of random data.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>randomGenerator</CODE> - source of random data</DL>
</DL>
<HR>

<A NAME="NaturalRanking(org.apache.commons.math3.stat.ranking.NaNStrategy, org.apache.commons.math3.random.RandomGenerator)"><!-- --></A><H3>
NaturalRanking</H3>
<PRE>
public <B>NaturalRanking</B>(<A HREF="../../../../../../org/apache/commons/math3/stat/ranking/NaNStrategy.html" title="enum in org.apache.commons.math3.stat.ranking">NaNStrategy</A>&nbsp;nanStrategy,
                      <A HREF="../../../../../../org/apache/commons/math3/random/RandomGenerator.html" title="interface in org.apache.commons.math3.random">RandomGenerator</A>&nbsp;randomGenerator)</PRE>
<DL>
<DD>Create a NaturalRanking with the given NaNStrategy, TiesStrategy.RANDOM
 and the given source of random data.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>nanStrategy</CODE> - NaNStrategy to use<DD><CODE>randomGenerator</CODE> - source of random data</DL>
</DL>

<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="getNanStrategy()"><!-- --></A><H3>
getNanStrategy</H3>
<PRE>
public <A HREF="../../../../../../org/apache/commons/math3/stat/ranking/NaNStrategy.html" title="enum in org.apache.commons.math3.stat.ranking">NaNStrategy</A> <B>getNanStrategy</B>()</PRE>
<DL>
<DD>Return the NaNStrategy
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>returns the NaNStrategy</DL>
</DD>
</DL>
<HR>

<A NAME="getTiesStrategy()"><!-- --></A><H3>
getTiesStrategy</H3>
<PRE>
public <A HREF="../../../../../../org/apache/commons/math3/stat/ranking/TiesStrategy.html" title="enum in org.apache.commons.math3.stat.ranking">TiesStrategy</A> <B>getTiesStrategy</B>()</PRE>
<DL>
<DD>Return the TiesStrategy
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>the TiesStrategy</DL>
</DD>
</DL>
<HR>

<A NAME="rank(double[])"><!-- --></A><H3>
rank</H3>
<PRE>
public double[] <B>rank</B>(double[]&nbsp;data)</PRE>
<DL>
<DD>Rank <code>data</code> using the natural ordering on Doubles, with
 NaN values handled according to <code>nanStrategy</code> and ties
 resolved using <code>tiesStrategy.</code>
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../../org/apache/commons/math3/stat/ranking/RankingAlgorithm.html#rank(double[])">rank</A></CODE> in interface <CODE><A HREF="../../../../../../org/apache/commons/math3/stat/ranking/RankingAlgorithm.html" title="interface in org.apache.commons.math3.stat.ranking">RankingAlgorithm</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>data</CODE> - array to be ranked
<DT><B>Returns:</B><DD>array of ranks
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../../org/apache/commons/math3/exception/NotANumberException.html" title="class in org.apache.commons.math3.exception">NotANumberException</A></CODE> - if the selected <A HREF="../../../../../../org/apache/commons/math3/stat/ranking/NaNStrategy.html" title="enum in org.apache.commons.math3.stat.ranking"><CODE>NaNStrategy</CODE></A> is <code>FAILED</code>
 and a <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Double.html?is-external=true#NaN" title="class or interface in java.lang"><CODE>Double.NaN</CODE></A> is encountered in the input data</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>


<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/NaturalRanking.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../../../org/apache/commons/math3/stat/ranking/NaNStrategy.html" title="enum in org.apache.commons.math3.stat.ranking"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../../../org/apache/commons/math3/stat/ranking/RankingAlgorithm.html" title="interface in org.apache.commons.math3.stat.ranking"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../../../index.html?org/apache/commons/math3/stat/ranking/NaturalRanking.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="NaturalRanking.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->

<HR>
Copyright &#169; 2003-2013 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.
</BODY>
</HTML>
